/* /static/css/chat.css */

.dialog-container {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 5px;
    /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);*/
    /* position: fixed; */ /* 移除 fixed 定位 */
    top: 0;
    left: 0;
    /* width: 99%; */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 让中间的对话框自适应宽度 */
}

.dialog-header {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
    flex-shrink: 0;
    border-bottom: 2px solid black; /* 添加分割线 */
}

.dialog-content {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px;
}

.dialog-content::-webkit-scrollbar {
    width: 8px;
}

.dialog-content::-webkit-scrollbar-track {
    background-color: transparent;
}

.dialog-content::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

.message-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.model-message {
    align-items: flex-start;
}

.name-message {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    max-width: 100%; /* 限制模型消息最大宽度 */
}

.user-name,
.model-name {
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 5px;
    color: white;
}

.user-name {
    background-color: #007bff;
}

.model-name {
    background-color: #28a745;
}

.message {
    background-color: rgba(200, 200, 200, 0.8);
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    word-break: break-all;
}

.input-area {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
}

.message-input {
    flex-grow: 1;
    padding: 5px;
    border-radius: 10px;
    border: 1px solid #ccc;
    resize: none;
    min-height: 20px;
    max-height: 100px;
    overflow-y: hidden;
    margin-right: 10px;
    font-size: 16px;
    opacity: 0.7; /* 设置透明度为 80% */
}

.message-input:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.message-input:focus,
.message-input:not(:placeholder-shown) {
    height: 5em;
    overflow-y: auto;
}

.send-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
}

.send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.send-button:enabled:hover {
    background-color: lightgreen;
}

.stop-button { /* 为停止按钮添加样式 */
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: 10px; /* 与发送按钮保持间距 */
}

.container {
    display: flex;
    height: 100vh; /* 设置容器高度为 100vh，占满屏幕高度 */
    width: 100%;
}

.left-panel {
    background-color: rgba(255, 255, 255, 0.5);
    width: 300px;
    padding: 20px;
    border-right: 2px solid #cccccc;
    overflow-y: auto;
    transition: width 0.3s ease-in-out; /* 添加过渡效果 */
    position: relative; /* 设置为相对定位 */
}

/* 隐藏时样式 */
.left-panel.collapsed {
    width: 35px; /* 将宽度设置为 0 */
}

.toggle-button {
    background-color: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    line-height: 1; /* 调整垂直居中 */
    transition: transform 0.3s ease-in-out;
    position: absolute; /* 设置为绝对定位 */
    bottom: 20px; /* 距离底部 20px */
    right: 20px; /* 距离右侧 20px */
    border-radius: 50%;
}

.toggle-button:hover {
    background-color: lightgray; /* 添加鼠标悬停效果 */
}

/* 旋转箭头 */
.left-panel.collapsed .toggle-button {
    transform: rotate(180deg);
}



